package com.cskaoyan.controller.admincontroller;

import com.cskaoyan.bean.po.MarketRegion;
import com.cskaoyan.bean.common.BaseRespVo;
import com.cskaoyan.bean.common.CommonData;
import com.cskaoyan.service.adminservice.RegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author:J
 * @datetime 2022/12/29 16:05
 * @description: TODO:行政区域controller层
 * http://182.92.235.201:8083/admin/region/list
 *
 */
@RestController
@RequestMapping("admin/region")

public class RegionController {
    @Autowired
    RegionService regionService;

    @RequestMapping("list")
    public BaseRespVo list(){
        CommonData<MarketRegion> data=regionService.list();
        //errno 0, data:RegionBO, errmsg:"成功"
        return BaseRespVo.okYa(data);

    }
}

